package com.xoa.controller.event;

import com.xoa.model.event.TimeLinePostDept;
import com.xoa.service.event.TimeLinePostDeptService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by 张丽军 on 2017/9/1.
 */
@RestController
@RequestMapping("/timeLinePostDept")
public class TimeLinePostDeptController {
    @Autowired
    TimeLinePostDeptService timeLinePostDeptService;

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 上午11:22:25
     * 方法介绍:   修改大事记管理部门信息
     * @param request
     * @param timeLinePostDept
     * @return
     */
    @ResponseBody
    @RequestMapping("/updateTimeLinePostDept")
    public ToJson<TimeLinePostDept> updateTimeLinePostDept(HttpServletRequest request, TimeLinePostDept timeLinePostDept){
        return timeLinePostDeptService.updateTimeLinePostDept(request,timeLinePostDept);
    }

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 上午11:42:25
     * 方法介绍:   新建大事记管理部门信息
     * @param request
     * @param timeLinePostDept
     * @return
     */
    @ResponseBody
    @RequestMapping("/addTimeLinePostDept")
    public ToJson<TimeLinePostDept> addTimeLinePostDept(HttpServletRequest request,TimeLinePostDept timeLinePostDept){
        return timeLinePostDeptService.addTimeLinePostDept(request,timeLinePostDept);
    }
}
